SET( APP_NAME openig-demo-earth )

SET( TARGET_SRC_FILES main.cpp )
SET( TARGET_OTHER_FILES DataFiles/default.txt
                        DataFiles/openig.xml
                        DataFiles/OpenIG-Earth-Splash.jpg
                        DataFiles/deployment.pri
)

ADD_EXECUTABLE( ${APP_NAME} ${TARGET_SRC_FILES}
                ${TARGET_OTHER_FILES} )

TARGET_LINK_LIBRARIES( ${APP_NAME}
    ${OSG_LIBRARIES}
    ${OSGEARTH_LIBRARIES}
    OpenIG-Engine
    ${OSGEARTH_LIBRARY}
    ${OSGEARTHUTIL_LIBRARY}
)

INSTALL(
    TARGETS ${APP_NAME}
    RUNTIME DESTINATION bin/openig-earth COMPONENT openig
)

SET_TARGET_PROPERTIES( ${APP_NAME} PROPERTIES PROJECT_LABEL "Application Earth" )

SET(INSTALL_INCDIR include)
SET(INSTALL_BINDIR bin/openig-earth)
IF(WIN32)
    SET(INSTALL_LIBDIR bin)
    SET(INSTALL_ARCHIVEDIR lib)
ELSE()
    SET(INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
    SET(INSTALL_ARCHIVEDIR ${CMAKE_INSTALL_LIBDIR})
ENDIF()

INSTALL(FILES ${CMAKE_CURRENT_LIST_DIR}/DataFiles/openig.xml DESTINATION ${INSTALL_BINDIR}/igdata/)
INSTALL(FILES ${CMAKE_CURRENT_LIST_DIR}/DataFiles/OpenIG-Earth-Splash.jpg DESTINATION ${INSTALL_BINDIR}/igdata/)
INSTALL(FILES ${CMAKE_CURRENT_LIST_DIR}/DataFiles/default.txt DESTINATION ${INSTALL_BINDIR}/)
